<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Vue.js</title>
    <link rel="stylesheet" href="style.css">
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>
    <div id="vue-app">
        <h1> v-if </h1>

        <button @click="error = !error">Toggle Error</button>
        <button @click="success = !success">Toggel Success</button>

        <p v-if="error">Something Error...</p>

        <p v-else-if="success">Success...</p>

        <!-- v-show 的DOM一直存在 只是改变了display属性 -->
        <p v-show="error">v-show</p>
    </div>

    <script src="app.js"></script>
</body>
</html>